﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using UnityEditor;
using Memo.Electricity.Engine;
using Memo.Electricity.Game;

namespace Memo.Electricity.Editor
{
	[CustomEditor(typeof(CBelt))]
	public class BeltEditor : UnityEditor.Editor
	{

		private CBelt mBelt;

		private void OnEnable()
		{
			mBelt = target as CBelt;
		}

		public override void OnInspectorGUI()
		{
			base.OnInspectorGUI();

			EditorGUILayout.BeginVertical();

			if (GUILayout.Button("Generate"))
			{
				mBelt.GenerateBelt();
			}

			EditorGUILayout.EndVertical();
		}
	}
}
